# b1 = b'fdjkslafjsadlkfdsffdklsafdkfdjskfdslfksdfkldsafdsjafffffffffffffffffffffffjdskljsalkfjdsalkfjdsalkfjsdalkfjsdalkfjdsalkfjdsalkfjs'
# len_b1 = len(b1)
# print(len_b1)  # 129
# # 129 ---> str --- >bytes
# s1 = str(len_b1).encode('utf-8')
# print(s1)
# print(len(s1))

# import struct
# # 将一个数字转化成等长度的bytes类型。
# ret = struct.pack('i', 1543654000)
# # print(ret, type(ret), len(ret))
#
# # # 通过unpack反解回来
# ret1 = struct.unpack('i',ret)[0]
# print(ret1)

# b1 = b''
# b1 = b1+ b'abc'
# b1 = b1 + b'rty'
# print(b1,len(b1))

# low版的问题:

# 1. 非常大的数据,直接用struct会报错

import struct
# # 将一个数字转化成等长度的bytes类型。
# ret = struct.pack('q', 154365400024634546545646546)
# print(ret, type(ret), len(ret))

# # 通过unpack反解回来
# ret1 = struct.unpack('i',ret)[0]
# print(ret1)


# 2. 报头信息不可能只包含数据总大小, md5,total_size, 文件路径,